﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/HeadManage.master" AutoEventWireup="true" CodeFile="Movie.aspx.cs" Inherits="Admin_Movie" %>

<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script>
        function show(id, name, type, wordintroduce, filepath, picpath, intropath, count) {
            $('#<%=hide_id.ClientID%>').val(id)
            $('#<%=name.ClientID%>').val(name)
            $('#<%=Dl_type.ClientID%>').val(type)
            $('#<%=introduce.ClientID%>').val(wordintroduce)
            $('#<%=path.ClientID%>').val(filepath)
            $('#<%=pic_path.ClientID%>').val(picpath)
            $('#<%=introducepic.ClientID%>').val(intropath)
            $('#<%=clickcount.ClientID%>').val(count)
        }

        function alertif(id) {
            $('#<%=hide_introduceid.ClientID%>').val(id);
            }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="display: inline">
        <asp:Button ID="Bt_delete" runat="server" Text="一键删除" class="am-btn am-btn-default am-round" OnClick="Bt_delete_Click"  OnClientClick="return true"/>
        <asp:TextBox ID="TB_key" runat="server" placeholder="输入关键字搜索.."></asp:TextBox>
        <asp:Button ID="Bt_find" runat="server" Text="查询" class="am-btn am-btn-success am-round" OnClick="Bt_find_Click" OnClientClick="return true" />
        <button id="Bt_add" type="button" class="am-btn am-btn-secondary am-round" data-am-modal="{target: '#my-alert'}">添加</button>
    </div>
    <div style="text-align: center; margin-top: 2%">
        <asp:Repeater ID="Repeater1" runat="server">
            <HeaderTemplate>
                <table class="am-table am-table-bordered am-table-radius am-table-striped">
                    <tr>
                        <th></th>
                        <th>片名</th>
                        <th>类型</th>
                        <th>一句话简介</th>
                        <th>简介</th>
                        <%-- <th>文件路径</th>
                        <th>海报</th>
                        <th>简介图片</th>--%>
                        <th>浏览次数</th>
                        <th>预览</th>
                        <th>修改</th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td>
                        <asp:CheckBox ID="CheckBoxid" runat="server" value='<%#Eval("Mv_id")%>' /></td>
                    <td>
                        <asp:Label runat="server" ID="lblMv_name" Text='<%# Eval("Mv_name") %>'></asp:Label></td>
                    <td>
                        <asp:Label runat="server" ID="lblMv_type" Text='<%# Eval("Mv_type") %>'></asp:Label></td>
                    <td>
                        <asp:Label runat="server" ID="lblMv_wordintroduce" Text='<%# Eval("Mv_wordintroduce") %>'></asp:Label></td>
                    <td>
                        <button id="Bt_introduce" type="button" class="am-btn am-btn-secondary am-round" data-am-modal="{target: '#introducemodel',width:900,height:400}" onclick="alertif('<%#Eval("Mv_id")%>')">修改简介</button>
                        <%--                        <td>
                            <asp:Label runat="server" ID="lblMv_downaddress" Text='<%# Eval("Mv_downaddress") %>'></asp:Label></td>
                        <td>
                            <asp:Label runat="server" ID="lblMv_headpic" Text='<%# Eval("Mv_headpic") %>'></asp:Label></td>
                        <td>
                            <asp:Label runat="server" ID="lblMv_introducepic" Text='<%# Eval("Mv_introducepic") %>'></asp:Label></td>--%>
                        <td>
                            <asp:Label runat="server" ID="lblMv_click" Text='<%# Eval("Mv_click") %>'></asp:Label></td>
                        <td>
                            <a id="yl" type="button" class="am-btn am-btn-warning am-round" href='<%#"../User/inf.aspx?id="+Eval("Mv_id")%>'></a></td>
                        <td>
                            <button id="bt_alert" type="button" class="am-btn am-btn-success am-round" onclick="show('<%#Eval("Mv_id")%>','<%# Eval("Mv_name") %>','<%# Eval("Mv_type") %>','<%# Eval("Mv_wordintroduce") %>','<%# Eval("Mv_downaddress") %>','<%# Eval("Mv_headpic") %>','<%# Eval("Mv_introducepic") %>','<%# Eval("Mv_click") %>')" data-am-modal="{target: '#my-alert'}"></button>
                        </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
    </div>
    <!--添加框-->
    <div class="am-modal am-modal-alert" tabindex="-1" id="my-alert">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">数据编辑</div>
            <div class="am-modal-bd">
                <div class="am-form am-form-horizontal">
                    <div class="am-form-group">
                        <label for="doc-ipt-3" class="am-u-sm-4 am-form-label">影片名</label>
                        <div class="am-u-sm-8">
                            <asp:TextBox runat="server" ID="name" placeholder="输入影片名" />
                        </div>
                        <p class="am-kai">
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="×影片名不能为空" ControlToValidate="name" ForeColor="Blue"></asp:RequiredFieldValidator>
                        </p>
                    </div>
                    <div class="am-form-group">
                        <label for="doc-ipt-3" class="am-u-sm-4 am-form-label">类型</label>
                        <div class="am-u-sm-8">
                            <asp:DropDownList ID="Dl_type" runat="server" class="am-radio">
                                <asp:ListItem Value="最新">
                                        最新
                                </asp:ListItem>
                                <asp:ListItem Value="国产">
                                        国产
                                </asp:ListItem>
                                <asp:ListItem Value="韩国">
                                        韩国
                                </asp:ListItem>
                                <asp:ListItem Value="日本">
                                        日本
                                </asp:ListItem>
                            </asp:DropDownList>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label for="doc-ipt-pwd-2" class="am-u-sm-4 am-form-label">一句话简介</label>
                        <div class="am-u-sm-8">
                            <asp:TextBox runat="server" ID="introduce" placeholder="输入简介" />
                        </div>

                    </div>
                    <div class="am-form-group">
                        <label for="doc-ipt-pwd-2" class="am-u-sm-4 am-form-label">文件名</label>
                        <div class="am-u-sm-8">
                            <asp:TextBox runat="server" ID="path" placeholder="输入文件名" />
                        </div>

                    </div>
                    <div class="am-form-group">
                        <label for="doc-ipt-pwd-2" class="am-u-sm-4 am-form-label">海报路径</label>
                        <div class="am-u-sm-8">
                            <asp:TextBox runat="server" ID="pic_path" placeholder="输入海报路径" />
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label for="doc-ipt-pwd-2" class="am-u-sm-4 am-form-label">简介图片</label>
                        <div class="am-u-sm-8">
                            <asp:TextBox runat="server" ID="introducepic" placeholder="输入简介图片" />
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label for="doc-ipt-pwd-2" class="am-u-sm-4 am-form-label">浏览次数</label>
                        <div class="am-u-sm-8">
                            <asp:TextBox runat="server" ID="clickcount" placeholder="输入浏览次数" />
                        </div>
                    </div>
                    <div class="am-form-group">
                        <div class="am-u-sm-10 am-u-sm-offset-1">
                            <asp:HiddenField ID="hide_id" runat="server" />
                            <asp:Button runat="server" ID="Bt_present" class="am-btn am-btn-default" Text="提交" OnClick="Bt_present_Click1" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--简介编辑框-->
    <div class="am-modal am-modal-alert" tabindex="-1" id="introducemodel">
        <div class="am-modal-dialog" style="height: 82%;">
            <div class="am-modal-hd">电影简介</div>
            <div class="am-modal-bd" style="height: 76%;">
                <ckeditor:ckeditorcontrol ID="CK_introduce_" runat="server"></ckeditor:ckeditorcontrol>
            </div>
            <div class="am-modal-footer" style="height: 24%;">
                <asp:HiddenField ID="hide_introduceid" runat="server" />
                <asp:Button ID="bt_Alertintroduce" runat="server" Text="修改" class="am-btn am-btn-default am-round" OnClick="bt_Alertintroduce_Click" />
            </div>
        </div>
    </div>
</asp:Content>

